﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResourceListForFun.aspx.cs"
    Inherits="Atomic.Web.Pages.Sys.ResourceListForFun" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        $(function () {
            $('#resourceList').treegrid({
                url: '/Handlers/Sys/ResourceHandler.ashx/?method=GetResourceWithFunList',
                idField: 'ID',
                treeField: 'Name',
                fitColumns: true,
                frozenColumns: [[
	                { field: 'Name', title: '页面名称', width: 250 }
				]],
                columns: [[
                    { field: 'Key', title: '唯一键', width: 150 }
                ]],
                toolbar: [
                    {
                        text: '功能列表',
                        iconCls: 'icon-function',
                        handler: function () {
                            var selected = $('#resourceList').treegrid('getSelected');
                            if (selected == null) {
                                $.messager.alert('提示信息', '请选择要编辑的资源', 'info');
                                return;
                            }
                            else {
                                //加载资源功能列表
                                $('#resourceFunListWindow').window('open');
                                $('#resourceFunListWindow').window('refresh', 'ResourceFunList.aspx?FormID=' + selected.ID);
                            }
                        }
                    }
                ]
            });

            //初始化资源功能列表窗口
            $('<div id="resourceFunListWindow"></div>').appendTo('body').window({
                href: 'javascript:void(0);',
                title: '功能列表',
                width: 600,
                height: 480,
                top: $(window).height() * 0.2,
                closed: true
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="resourceList">
    </div>
    </form>
</body>
</html>
